/**
 * Created by dell on 2015/2/4.
 */
(function () {
    angular.module('app')
        .factory('tunnelService', tunnelService);

    tunnelService.$inject = ['$window'];
    function tunnelService($window) {
        var TS = {
            setData: setData,
            getData: getData,
            removeData: removeData
        };

        var tunnelData = {};

        function removeData(name) {
            tunnelData[name] = null;
        }

        function setData(name, value) {
            tunnelData[name] = value;
        }

        function getData(name) {
            return tunnelData[name];
        }

        return TS;
    }
})();